#!/usr/local/php/bin/php
<?php
#######################################################
## 
#######################################################
exit;

$fp = fopen('lankou.txt', 'r');
if (!$fp){
	trigger_error("Can't  open file to read");
	exit(1);
}

$db = mysql_connect('localhost:3306', 'mysql', 'sdPx#&4iov%');
if(!mysql_select_db('tryapp_s',$db)){
	exit;
}

while(!feof($fp)){
	$line = trim(fgets($fp));
	if (empty($line)){
		continue;
	}

	$code = $line;

	$sql = sprintf("insert ignore into g_thirdcaptcha(code, group_name) values('%s', 'lankou')", mysql_real_escape_string($code));
	mysql_query($sql, $db);
}
fclose($fp);
exit;

include('lankou_code.inc');
$db = mysql_connect('localhost:3306', 'mysql', 'sdPx#&4iov%');
if(!mysql_select_db('tryapp_s',$db)){
	exit;
}

foreach($lankou_code as $code){
	$sql = sprintf("insert ignore into g_thirdcaptcha(code, group_name) values('%s', 'lankou')", mysql_real_escape_string($code));
	mysql_query($sql, $db);
}

?>
